package com.ljk.study3logback.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * desc:hello world 的controller
 *
 * @author ljk
 * @date 2021/3/27 13:26
 */
@RestController
@Slf4j
public class HelloController {

    @RequestMapping("/h")
    public Map sayHello(){
        Map<String, Object> result = new HashMap<>();
        result.put("code",200);
        result.put("data",null);
        result.put("message","请求成功");
        log.info("自定义日志测试:{}",result.toString());
        return result;
    }
}
